﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Streambolics.Hp41s
{
    public delegate void FlagsDelegate (Flags aFlags);
    public class FlagsInstruction : Instruction
    {
        FlagsDelegate _Delegate;

        public FlagsInstruction (FlagsDelegate aDelegate, string aName)
            : base (aName)
        {
            _Delegate = aDelegate;
        }

        protected override void Execute (Context aContext)
        {
            _Delegate (aContext.Machine.Flags);
        }
    }
}
